# 2023-3 1
n= int(input())
ret = 0
p = True;
for i in range(1,n+1,2):
    # print(i)
    if p:
        ret+=1/i
    else:
        ret-=1/i
    p= not p
print(f'{ret:0.8}')